package cn.zl.ZLM.helper;


import cn.zl.ZLM.core.ZLMApi;
import cn.yunbamboos.exception.AppException;

public class ZLMApiHelper {

    private ZLMApi api;

    private ZLMApiHelper() {}

    private static class ZLMApiHelperInstance {
        private static final ZLMApiHelper INSTANCE = new ZLMApiHelper();
    }

    public static ZLMApiHelper getInstance() {
        return ZLMApiHelperInstance.INSTANCE;
    }

    public ZLMApi getApi() {
        if(api == null){
            throw AppException.c("zlm api is null");
        }
        return api;
    }

    public void setApi(ZLMApi api) {
        this.api = api;
    }
}
